@extends('layouts.app')

@section('content')

<div class="container" style="margin:51px auto;">
	<div class="row">
		<div class="listBox clear"   id="indexVum">
			<div class="list borderBottom clear" v-for="item in items">
	    		<a :href="item.href">
	    			<div class="listSys fl"><img :src="item.imgP" alt="" width="35px"></div>
	    			<div class="list-intro fl">
	    				<div class="fl textLeft" style="padding-right:0;width:60%;">
	    					<p class="list-tit">@{{item.name}}</p>
	    					<p class="colAba fontSize12">@{{ item.message }}</p>
	    				</div>
	        			
	    			</div>
	    		</a>
			</div>
        </div>
</div>
<style>
	a{color: #333;}
	.nav-tabs>li.active>a, .nav-tabs>li.active>a:hover, .nav-tabs>li.active>a:focus{color: #fff;}
	.nav-tabs li.active a{background: #db3031;}
</style>
<script>
   
	var uio=[
			// {
			// 	name:"Jyy",
			// 	message:"Hello Everyy One",
			// }
			]

$(function(){
	
	var vum = new Vue({
		el:"#indexVum",
		data:{
			items:uio
		},
		methods:{
			getRefresh:function(){
				
			}
		}
	});
	
	// setInterval(function(){
	// 	vum.getRefresh()
	// },2000)
})
</script>
<script src="{{ asset('js/app.js') }}"></script>
<script type="text/javascript">
	window.Echo.channel('chat-room.1')
    .listen('ChatMessageWasReceived', function (data) {
        //console.log(data.user, data.chatMessage);
         uio.push({name:data.user.name,message:data.chatMessage.message});
    });
</script>
@endsection
@section('footer')
<!--footer-->
<div class="footerBox">
    <a href="{{ url('/home') }}" class="footerItem "><img src="{{ asset('images/index/icon01.png') }}" alt="" class="footer-icon"><br>首页</a>
    <a href="{{ url('/chat') }}" class="footerItem footerItem-cur"><img src="{{ asset('images/index/icon02-cur.png') }}" alt="" class="footer-icon"><br>互动</a>
    <a href="{{ url('/get_article') }}" class="footerItem "><img src="{{ asset('images/index/icon02.png') }}" alt="" class="footer-icon"><br>资讯</a>
    <a href="{{ url('/userinfo') }}" class="footerItem "><img src="{{ asset('images/index/icon03.png') }}" alt="" class="footer-icon"><br>我的</a>
</div>
 @show